// 
// 
// 

#include "Led.h"

Led::Led()
{
}

Led::Led(const int pin)
{
	ledPin = pin;
}

void Led::SetPinNum(const int pin)
{
	ledPin = pin;
	return;
}

void Led::Init(void)
{
	pinMode(ledPin, OUTPUT);
}

void Led::On(void)
{
	if (!status)
	{
		digitalWrite(ledPin, HIGH);
		status = true;
	}
	return;
}

void Led::Off(void)
{
	if (status)
	{
		digitalWrite(ledPin, LOW);
		status = false;
	}
	return;
}

void Led::Toggle(void)
{
	if (status)
	{
		digitalWrite(ledPin, LOW);
	}
	else
	{
		digitalWrite(ledPin, HIGH);
	}
	status = !status;
	return;
}

